package com.example.feature.demo.vo;

import com.github.liaochong.myexcel.core.annotation.ExcelColumn;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * HYMember
 *
 * @author zhouxianfeng
 * @date 2021-5-17
 */
@Data
public class HYMember {

    /**
     * 会员姓名
     */
    @ExcelColumn(index = 0)
    @NotBlank(message = "{HYMember.name.notBlank}")
    @Size(max = 20, message = "{HYMember.name.size}")
    private String name;
    /**
     * 区号
     */
    @ExcelColumn(index = 1)
    @NotBlank(message = "{HYMember.areaCode.notBlank}")
    @Size(max = 10, message = "{HYMember.areaCode.size}")
    private String areaCode;
    /**
     * 手机号
     */
    @ExcelColumn(index = 2)
    @NotBlank(message = "{HYMember.phone.notBlank}")
    @Size(max = 16, message = "{HYMember.phone.size}")
    private String phone;
    /**
     * 证件号
     */
    @ExcelColumn(index = 3)
    @NotBlank(message = "{HYMember.idNum.notBlank}")
    private String idNum;

    /**
     * 会员积分
     */
    @ExcelColumn(index = 4)
    @NotBlank(message = "{HYMember.point.notBlank}")
    @Pattern(regexp = "^\\d{1,8}$", message = "{HYMember.point.Pattern}")
    private String point;
    /**
     * 会员等级
     */
    @ExcelColumn(index = 5)
    @NotBlank(message = "{HYMember.levelName.notBlank}")
    @Size(max = 32, message = "{HYMember.levelName.size}")
    private String levelName;

    /**
     * 生效日期
     */
    @ExcelColumn(index = 6)
    @NotBlank(message = "{HYMember.effectDate.notBlank}")
    @Pattern(regexp = "^[1-9]\\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", message = "{HYMember.effectDate.Pattern}")
    private String effectDate;
    /**
     * 到期日期
     */
    @ExcelColumn(index = 7)
    @Pattern(regexp = "^[1-9]\\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", message = "{HYMember.expireDate.Pattern}")
    private String expireDate;

    @ExcelColumn(index = 8)
    @NotBlank(message = "{HYMember.batchNo.notBlank}")
    @Size(max = 32, message = "{HYMember.batchNo.size}")
    private String batchNo;
}
